// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CatalogProductLinkAttribute generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_link_attribute", catalog = "magento")
public class CatalogProductLinkAttribute implements java.io.Serializable {

	private Short productLinkAttributeId;
	private CatalogProductLinkType catalogProductLinkType;
	private String productLinkAttributeCode;
	private String dataType;
	private Set catalogProductLinkAttributeVarchars = new HashSet(0);
	private Set catalogProductLinkAttributeDecimals = new HashSet(0);
	private Set catalogProductLinkAttributeInts = new HashSet(0);

	public CatalogProductLinkAttribute() {
	}

	public CatalogProductLinkAttribute(
			CatalogProductLinkType catalogProductLinkType,
			String productLinkAttributeCode, String dataType) {
		this.catalogProductLinkType = catalogProductLinkType;
		this.productLinkAttributeCode = productLinkAttributeCode;
		this.dataType = dataType;
	}

	public CatalogProductLinkAttribute(
			CatalogProductLinkType catalogProductLinkType,
			String productLinkAttributeCode, String dataType,
			Set catalogProductLinkAttributeVarchars,
			Set catalogProductLinkAttributeDecimals,
			Set catalogProductLinkAttributeInts) {
		this.catalogProductLinkType = catalogProductLinkType;
		this.productLinkAttributeCode = productLinkAttributeCode;
		this.dataType = dataType;
		this.catalogProductLinkAttributeVarchars = catalogProductLinkAttributeVarchars;
		this.catalogProductLinkAttributeDecimals = catalogProductLinkAttributeDecimals;
		this.catalogProductLinkAttributeInts = catalogProductLinkAttributeInts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "product_link_attribute_id", unique = true, nullable = false)
	public Short getProductLinkAttributeId() {
		return this.productLinkAttributeId;
	}

	public void setProductLinkAttributeId(Short productLinkAttributeId) {
		this.productLinkAttributeId = productLinkAttributeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "link_type_id", nullable = false)
	public CatalogProductLinkType getCatalogProductLinkType() {
		return this.catalogProductLinkType;
	}

	public void setCatalogProductLinkType(
			CatalogProductLinkType catalogProductLinkType) {
		this.catalogProductLinkType = catalogProductLinkType;
	}

	@Column(name = "product_link_attribute_code", nullable = false, length = 32)
	public String getProductLinkAttributeCode() {
		return this.productLinkAttributeCode;
	}

	public void setProductLinkAttributeCode(String productLinkAttributeCode) {
		this.productLinkAttributeCode = productLinkAttributeCode;
	}

	@Column(name = "data_type", nullable = false, length = 32)
	public String getDataType() {
		return this.dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductLinkAttribute")
	public Set getCatalogProductLinkAttributeVarchars() {
		return this.catalogProductLinkAttributeVarchars;
	}

	public void setCatalogProductLinkAttributeVarchars(
			Set catalogProductLinkAttributeVarchars) {
		this.catalogProductLinkAttributeVarchars = catalogProductLinkAttributeVarchars;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductLinkAttribute")
	public Set getCatalogProductLinkAttributeDecimals() {
		return this.catalogProductLinkAttributeDecimals;
	}

	public void setCatalogProductLinkAttributeDecimals(
			Set catalogProductLinkAttributeDecimals) {
		this.catalogProductLinkAttributeDecimals = catalogProductLinkAttributeDecimals;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductLinkAttribute")
	public Set getCatalogProductLinkAttributeInts() {
		return this.catalogProductLinkAttributeInts;
	}

	public void setCatalogProductLinkAttributeInts(
			Set catalogProductLinkAttributeInts) {
		this.catalogProductLinkAttributeInts = catalogProductLinkAttributeInts;
	}

}
